#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int sum = 0;

int DigitSum(int n)
{
		return  sum += n % 10;
	}
}
int main()
{
	int n = 0;
	scanf("%d", &n);
	printf("%lld",DigitSum(n));
	return 0;
}